package net.hn.hnms.biz.blueprint.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author wangjingrui
 * @date 2022/9/13 11:23
 */
@Data
@NoArgsConstructor
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = false)
@Table(name = "file_info")
public class FileInfo extends BaseModel {

    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_UUID)
    private String fileInfoId;

    @ApiModelProperty(value = "文件名称")
    @Length(max = 100, message = "文件名称长度不能超过100个字符")
    @NotBlank(message = "文件名称不能为空")
    private String fileName;


    @ApiModelProperty(value = "版本号")
    @Length(max = 100, message = "版本号长度不能超过100个字符")
    @NotBlank(message = "版本号不能为空")
    private String versionCode;

    @ApiModelProperty(value = "文件大小")
    @Length(max = 32, message = "文件大小长度不能超过32")
    @NotNull(message = "文件大小不能为空")
    private Integer fileSize;

    @ApiModelProperty(value = "文件分类Id")
    @Length(max = 255, message = "文件分类Id长度不能超过255个字符")
    @NotBlank(message = "文件分类Id不能为空")
    private String fileTypeId;

    @ApiModelProperty(value = "文件后缀")
    @Length(max = 100, message = "文件后缀长度不能超过100个字符")
    @NotBlank(message = "文件后缀不能为空")
    private String suffixType;

    @ApiModelProperty(value = "文件路径")
    @Length(max = 100, message = "文件路径长度不能超过100个字符")
    @NotBlank(message = "文件路径不能为空")
    private String filePath;

    @ApiModelProperty(value = "oss存储ID")
    @Length(max = 255, message = "oss存储ID长度不能超过255个字符")
    @NotBlank(message = "oss存储ID不能为空")
    private Long ossId;

    @ApiModelProperty(value = "煤矿编码")
    private String mineCode;

}
